﻿using Solution.Business.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Solution.Data
{
    public class FreeNewsDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<FreeNew> FreeNews_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.FreeNews_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void FreeNews_Insert(FreeNew freenews)
        {
            context.FreeNews_Insert(freenews.Title, freenews.Details, freenews.Date, freenews.Status, freenews.LgId, freenews.TrId, freenews.UId);
        }

        public void FreeNews_Update(FreeNew freenews)
        {
            context.FreeNews_update(freenews.FNId, freenews.Title, freenews.Details, freenews.Date, freenews.Status, freenews.LgId, freenews.TrId, freenews.UId);
        }
    }
}
